﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EFFC.Net.Parameters;

namespace EFFC.Net.BatchBuilder.Parameters
{
    [Serializable]
    public class BatchManagerParameter:ParametersStd
    {
        public BatchManagerParameter()
        {
            AddPElement("CurrentPage", typeof(int));
            AddPElement("GoToPage", typeof(int));
            AddPElement("IsOperatorLog", typeof(bool));

            SetValue("CurrentPage", 1);
            SetValue("GoToPage", 1);
            SetValue("IsOperatorLog", true);
        }
        /// <summary>
        /// 當前頁，用於翻頁
        /// </summary>
        public int CurrentPage
        {
            get { return GetValue<int>("CurrentPage"); }
            set { _p["CurrentPage"].Value = value; }
        }
        /// <summary>
        /// 要跳到哪一頁
        /// </summary>
        public int GoToPage
        {
            get { return GetValue<int>("GoToPage"); }
            set { _p["GoToPage"].Value = value; }
        }

        /// <summary>
        /// 是否要記錄操作log，默認開啟
        /// </summary>
        public bool IsOperatorLog
        {
            get { return GetValue<bool>("IsOperatorLog"); }
            set { SetValue("IsOperatorLog", value); }
        }
    }
}
